<script setup>
import TableModule from "@/components/share/TableModule.vue";

import {storeToRefs} from "pinia";
import {useUserStore} from "@/stores/UserStores.js";

const UserStore = useUserStore()
const {submitIdListShow, submitId} = storeToRefs(UserStore)
const {getTable} = UserStore

const optSubmitId = () => {
  getTable(submitId.value)
}
</script>

<template>
  <div>
    <el-select v-model="submitId" placeholder="请选择课程表" @change="optSubmitId">
      <el-option
          v-for="item in submitIdListShow"
          :key="item.submitId"
          :label="item.name"
          :value="item.submitId">
      </el-option>
    </el-select>
  </div>
  <div>
    <TableModule></TableModule>
  </div>
</template>

<style scoped>

</style>
